/*
 * @Author: liyanwei 15230656038@163.com
 * @Date: 2023-10-17 11:36:46
 * @LastEditors: liyanwei
 * @LastEditTime: 2023-10-17 17:19:54
 * @FilePath: \cesium-vue3-vite\src\store\store.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import { defineStore } from 'pinia'

export const useGisStore = defineStore('gisStore', {
  // 开启数据持久化
  persist: true,
  state: () => {
    return { count: 0, viewer: markRaw({}) }
  },
  // 也可以定义为
  // state: () => ({ count: 0 })
  actions: {
    increment() {
      this.count++
    },
    setViewer(viewer) {
      this.viewer = toRaw(viewer)
    }
  }
})
